package com.kmg.scart.model;

import java.util.HashSet;
import java.util.Set;

public class ProductCategory extends ApplicationEntity{

	private String name;
	
	private String description;
	
	private String longName;
	
	private ProductCategory parent;

	private Set<Product> products;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLongName() {
		return longName;
	}

	public void setLongName(String longName) {
		this.longName = longName;
	}

	public ProductCategory getParent() {
		return parent;
	}

	public void setParent(ProductCategory parent) {
		this.parent = parent;
	}

	public Set<Product> getProducts() {
		return products;
	}

	public void setProducts(Set<Product> products) {
		this.products = products;
	}
	
	public void addProduct(Product product){
		if(products == null){
			products = new HashSet<Product>();
		}
		products.add(product);
	}
}
